<template>
	<view class="pay-bar">
		<view class="goods-count">
			共{{count}}件
		</view>
		<view class="goods-total-price">
			<view class="label">合计</view>
			<view class="price">￥{{totalPrice}}</view>
		</view>
		<view class="pay-btn-wrapper">
			<g-button  btn_text="立即支付" :height="76" :width="228" :borderRadius="16" @click="order"/>
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { defineProps,defineEmits } from 'vue';
	
	const emit = defineEmits(['order']);

	interface IProps {
		totalPrice : number,
		count : number|string,
	}

	const props = withDefaults(defineProps<IProps>(), {
		totalPrice: 0,
		count: 0,
		isPaying:false,
	})
	
	const order = ()=>{
		emit('order');
	}
</script>

<style scoped lang="scss">
	@import "./payBar.scss";
</style>